package cn.wolfcode.mapper;

import cn.wolfcode.domain.Exam;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ExamMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Exam record);

    List<Exam> selectAll();

    int updateByPrimaryKey(Exam record);

    Exam selectById(Long id);

    Exam selectByPrimaryKey(Long id);

    //保存关系表
    void saveRelation(@Param("examId") Long examId, @Param("questionId") Long questionId, @Param("sequence") int sequence, @Param("score") int score);

    //根据exam的id获取question的ids
    List<Long> selectQueIdByExamId(Long id);
}